<#assign prefixName = 'WHERE'>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__id??)>
	<#if (where__and__eq__id__value??)>
${prefixName} T.ID = :where__and__eq__id__value
	<#else>
${prefixName} T.ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__id??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__id__value??)>
${prefixName} T.ID <> :where__and__nq__id__value
	<#else>
${prefixName} T.ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__id??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__id__value??)>
${prefixName} T.ID = :where__or__eq__id__value
	<#else>
${prefixName} T.ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__id??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__id__value??)>
${prefixName} T.ID <> :where__or__nq__id__value
	<#else>
${prefixName} T.ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__endDaTi??)>
	<#if (where__and__eq__endDaTi__value??)>
${prefixName} T.END_DA_TI = :where__and__eq__endDaTi__value
	<#else>
${prefixName} T.END_DA_TI IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__endDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__endDaTi__value??)>
${prefixName} T.END_DA_TI <> :where__and__nq__endDaTi__value
	<#else>
${prefixName} T.END_DA_TI IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__endDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__endDaTi__value??)>
${prefixName} T.END_DA_TI = :where__or__eq__endDaTi__value
	<#else>
${prefixName} T.END_DA_TI IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__endDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__endDaTi__value??)>
${prefixName} T.END_DA_TI <> :where__or__nq__endDaTi__value
	<#else>
${prefixName} T.END_DA_TI IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__resourceId??)>
	<#if (where__and__eq__resourceId__value??)>
${prefixName} T.RESOURCE_ID = :where__and__eq__resourceId__value
	<#else>
${prefixName} T.RESOURCE_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__resourceId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__resourceId__value??)>
${prefixName} T.RESOURCE_ID <> :where__and__nq__resourceId__value
	<#else>
${prefixName} T.RESOURCE_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__resourceId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__resourceId__value??)>
${prefixName} T.RESOURCE_ID = :where__or__eq__resourceId__value
	<#else>
${prefixName} T.RESOURCE_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__resourceId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__resourceId__value??)>
${prefixName} T.RESOURCE_ID <> :where__or__nq__resourceId__value
	<#else>
${prefixName} T.RESOURCE_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__validateFalseId??)>
	<#if (where__and__eq__validateFalseId__value??)>
${prefixName} T.VALIDATE_FALSE_ID = :where__and__eq__validateFalseId__value
	<#else>
${prefixName} T.VALIDATE_FALSE_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__validateFalseId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__validateFalseId__value??)>
${prefixName} T.VALIDATE_FALSE_ID <> :where__and__nq__validateFalseId__value
	<#else>
${prefixName} T.VALIDATE_FALSE_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__validateFalseId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__validateFalseId__value??)>
${prefixName} T.VALIDATE_FALSE_ID = :where__or__eq__validateFalseId__value
	<#else>
${prefixName} T.VALIDATE_FALSE_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__validateFalseId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__validateFalseId__value??)>
${prefixName} T.VALIDATE_FALSE_ID <> :where__or__nq__validateFalseId__value
	<#else>
${prefixName} T.VALIDATE_FALSE_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__validateRuId??)>
	<#if (where__and__eq__validateRuId__value??)>
${prefixName} T.VALIDATE_RU_ID = :where__and__eq__validateRuId__value
	<#else>
${prefixName} T.VALIDATE_RU_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__validateRuId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__validateRuId__value??)>
${prefixName} T.VALIDATE_RU_ID <> :where__and__nq__validateRuId__value
	<#else>
${prefixName} T.VALIDATE_RU_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__validateRuId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__validateRuId__value??)>
${prefixName} T.VALIDATE_RU_ID = :where__or__eq__validateRuId__value
	<#else>
${prefixName} T.VALIDATE_RU_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__validateRuId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__validateRuId__value??)>
${prefixName} T.VALIDATE_RU_ID <> :where__or__nq__validateRuId__value
	<#else>
${prefixName} T.VALIDATE_RU_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__validateTrueId??)>
	<#if (where__and__eq__validateTrueId__value??)>
${prefixName} T.VALIDATE_TRUE_ID = :where__and__eq__validateTrueId__value
	<#else>
${prefixName} T.VALIDATE_TRUE_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__validateTrueId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__validateTrueId__value??)>
${prefixName} T.VALIDATE_TRUE_ID <> :where__and__nq__validateTrueId__value
	<#else>
${prefixName} T.VALIDATE_TRUE_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__validateTrueId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__validateTrueId__value??)>
${prefixName} T.VALIDATE_TRUE_ID = :where__or__eq__validateTrueId__value
	<#else>
${prefixName} T.VALIDATE_TRUE_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__validateTrueId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__validateTrueId__value??)>
${prefixName} T.VALIDATE_TRUE_ID <> :where__or__nq__validateTrueId__value
	<#else>
${prefixName} T.VALIDATE_TRUE_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__orderNum??)>
	<#if (where__and__eq__orderNum__value??)>
${prefixName} T.ORDER_NUM = :where__and__eq__orderNum__value
	<#else>
${prefixName} T.ORDER_NUM IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__orderNum??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__orderNum__value??)>
${prefixName} T.ORDER_NUM <> :where__and__nq__orderNum__value
	<#else>
${prefixName} T.ORDER_NUM IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__orderNum??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__orderNum__value??)>
${prefixName} T.ORDER_NUM = :where__or__eq__orderNum__value
	<#else>
${prefixName} T.ORDER_NUM IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__orderNum??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__orderNum__value??)>
${prefixName} T.ORDER_NUM <> :where__or__nq__orderNum__value
	<#else>
${prefixName} T.ORDER_NUM IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__beginDaTi??)>
	<#if (where__and__eq__beginDaTi__value??)>
${prefixName} T.BEGIN_DA_TI = :where__and__eq__beginDaTi__value
	<#else>
${prefixName} T.BEGIN_DA_TI IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__beginDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__beginDaTi__value??)>
${prefixName} T.BEGIN_DA_TI <> :where__and__nq__beginDaTi__value
	<#else>
${prefixName} T.BEGIN_DA_TI IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__beginDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__beginDaTi__value??)>
${prefixName} T.BEGIN_DA_TI = :where__or__eq__beginDaTi__value
	<#else>
${prefixName} T.BEGIN_DA_TI IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__beginDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__beginDaTi__value??)>
${prefixName} T.BEGIN_DA_TI <> :where__or__nq__beginDaTi__value
	<#else>
${prefixName} T.BEGIN_DA_TI IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
